-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
smarter logical combination that keeps truthy/falsy/nullish property #8873
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Skipped Deployments
|
🟢 Turbopack Benchmark CI successful 🟢Thanks |
✅ This change can build |
|
Which cases were handled before this PR? |
Alternatives { | ||
total_nodes: usize, | ||
values: Vec<JsValue>, | ||
additional_property: Option<AdditionalProperty>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could store the logical operation here instead, and evaluate on demand? 🤔
I guess that is ever so slightly less optimized
The |
585b336
to
b2cc4c2
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b2cc4c2
to
8a4ede8
Compare
…ercel/turborepo#8873) ### Description Allows to handle `if (unknown && falsy)` `if (unknown || truthy)` `if (unknown ?? nullish)` in static analysis. Hint: review each commit on it's own, since the first commit is only changing to a named struct. ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
* vercel/turborepo#8879 <!-- Niklas Mischkulnig - Convert MDX errors into issues --> * vercel/turborepo#8873 <!-- Tobias Koppers - smarter logical combination that keeps truthy/falsy/nullish property --> * vercel/turborepo#8890 <!-- Tobias Koppers - Skip unreachable code when early return can be statically analysed -->
…ercel/turborepo#8873) ### Description Allows to handle `if (unknown && falsy)` `if (unknown || truthy)` `if (unknown ?? nullish)` in static analysis. Hint: review each commit on it's own, since the first commit is only changing to a named struct. ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
* vercel/turborepo#8879 <!-- Niklas Mischkulnig - Convert MDX errors into issues --> * vercel/turborepo#8873 <!-- Tobias Koppers - smarter logical combination that keeps truthy/falsy/nullish property --> * vercel/turborepo#8890 <!-- Tobias Koppers - Skip unreachable code when early return can be statically analysed -->
Description
Allows to handle
if (unknown && falsy)
if (unknown || truthy)
if (unknown ?? nullish)
in static analysis.Hint: review each commit on it's own, since the first commit is only changing to a named struct.
Testing Instructions